#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    int sumOfMultiples(int n)
    {
        int sum = 0;
        for (int i = 1;i <= n;i++)
        {
            if (i % 3 == 0 || i % 5 == 0 || i % 7 == 0)
            {
                //cout<<i<<endl;
                sum += i;
                //cout<<sum<<endl;
            }
        }
        return sum;
    }
};